package framework.objects;

import javax.microedition.khronos.opengles.GL10;

import framework.objects.Bg;

public abstract class ScrolledBg extends Bg {

	private float v;

	public ScrolledBg(float v) {
		super();
		this.v = v;
	}

	@Override
	public void draw(GL10 gl, float deltaTime) {
		x -= v * deltaTime;
		if (x < - width) {
			x = 0;
		}
		presentation.draw(deltaTime, gl, x, y);
		presentation.draw(deltaTime, gl, x + width, y);
	}

}
